home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / 42 ƒ / 42_plugin_manager.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-25  |  834 b   |  30 lines  |  [TEXT/CWIE]

  1. /*
  2.     1. init is called when thread starts
  3.     2. idle1 and idle2 are called in sequence from the thread
  4.     3. click is called if there is a mousedown in the plugin area
  5.     4. ipc will pass two values to the plugin
  6.     5. kill is called when thread ends
  7. */
  8.  
  9. typedef struct forty_two_plugin_api forty_two_plugin_api;
  10.  
  11. typedef struct forty_two_plugin_api
  12. {
  13.     int    (*init)(void);
  14.     int    (*kill)(void);
  15.     int    (*idle1)(void);
  16.     int    (*idle2)(void);
  17.     int    (*click)(Point *loc);
  18.     int    (*ipc)(int type,unsigned long msg);
  19.     void    (*update)(forty_two_plugin_api *plugin); /* filled in by plugin manager */
  20.     
  21.     short        req_dialog_item;
  22.     GWorldPtr    port;
  23. };
  24.  
  25. int forty_two_init(DialogPtr dialog);
  26. void forty_two_kill(void);
  27. void forty_two_thread(void);
  28. void forty_two_update(forty_two_plugin_api *plugin);
  29. void forty_two_update_all(void);
  30. void forty_two_click(Point *pt);